#ifndef UMSUSERS_H
#define UMSUSERS_H

#include "umsdatabase.h"

struct User{
	QString login;
	QString passwd;
	QString fam;
	QString name;
	QString otch;
	QString cert;
	QStringList hosts;
	QStringList bases;
};

class UMSUsers{
		UMSDatabase *_dbase;
		QString selectCrd(const QString &crdname,const QString &uname);
	public:
		UMSUsers(UMSDatabase *dbase=0);
		QMap<QString,QString> users();
		QStringList databases(const QString &uname);
		QStringList addrs(const QString &uname);
		void newUser(const QString &uname);
		void newUser(User *u);
		void removeUser(const QString &uname);
		User *user(const QString &uname);
};

#endif
